package com.sc.entity;

import com.mybatisflex.annotation.*;


import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 考勤记录表 实体类。
 *
 * @author JoeZhou
 * @since 2024-09-14
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "sms_attendance_records", schema = "study_club")
public class AttendanceRecords implements Serializable {

    @Id(keyType = KeyType.Auto)
    private Long id;

    /**
     * 授课时间ID
     */
    private Long teachingScheduleId;

    /**
     * 学生ID
     */
    private Long studentId;

    /**
     * 出勤状态（0：缺勤，1：出勤，2：请假）
     */
    private Integer status;

    /**
     * 备注（请假原因、线上出勤等）
     */
    private String note;

    @Column(isLogicDelete = true)
    private Integer isDelete;

    /**
     * 备注
     */
    private String info;

    /**
     * 创建时间
     */
    private LocalDateTime created;

    /**
     * 更新时间
     */
    private LocalDateTime updated;

    /**
     * 版本
     */
    @Column(version = true)
    private Integer version;

    /**
     * 班级id
     */
    private  Long clazzId;


    @RelationManyToOne(selfField = "studentId",targetField = "id")
    private Student student;
    @RelationManyToOne(selfField = "clazzId",targetField = "id")
    private Clazz clazz;
    @RelationManyToOne(selfField = "teachingScheduleId",targetField = "id")
    private TeachingSchedules teachingSchedules;
}
